package com.correo.modelo.server;

import java.sql.SQLException;
import java.util.List;

import com.correo.database.beans.IBean;
import com.correo.database.server.ManagerDataBase;
import com.correo.exceptions.server.AltaException;
import com.correo.exceptions.server.ModifyException;
import com.correo.exceptions.server.RefreshException;
import com.correo.exceptions.server.RemoveException;
import com.correo.exceptions.server.ViewException;

public class ModelUser implements IModel {

	
	public ModelUser(){
		
	}
	public void alta(IBean dataBean) throws AltaException, SQLException, ClassNotFoundException {
		ManagerDataBase.getInstance().getMngUserDataBase().alta(dataBean);

	}

	public void modify(IBean bean) throws ModifyException, ClassNotFoundException, SQLException {
		ManagerDataBase.getInstance().getMngUserDataBase().modify(bean);

	}

	@Override
	public List<IBean> refresh() throws RefreshException, SQLException, ClassNotFoundException {
		
		return ManagerDataBase.getInstance().getMngUserDataBase().refresh();
		
	}

	public void remove(List<IBean> listBean) throws RemoveException, SQLException, ClassNotFoundException {
		ManagerDataBase.getInstance().getMngUserDataBase().remove(listBean);

	}

	public void view(IBean bean) throws ViewException {
		// TODO Auto-generated method stub

	}

	public List<IBean> actualizar() {
		// TODO Auto-generated method stub
		return null;
	}

}
